<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32VGA: ESP32VGA::VGAControllerClass Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP32VGA
   </div>
   <div id="projectbrief">ESP32 VGA Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>ESP32VGA</b></li><li class="navelem"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html">VGAControllerClass</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ESP32VGA::VGAControllerClass Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents the VGA controller.  
 <a href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_v_g_a_controller_8h_source.html">VGAController.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aea7548e9a68a84cddc74aae65a0e96b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#aea7548e9a68a84cddc74aae65a0e96b4">begin</a> (gpio_num_t redGPIO, gpio_num_t greenGPIO, gpio_num_t blueGPIO, gpio_num_t HSyncGPIO, gpio_num_t VSyncGPIO)</td></tr>
<tr class="memdesc:aea7548e9a68a84cddc74aae65a0e96b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the 8 colors (5 GPIOs) initializer.  <a href="#aea7548e9a68a84cddc74aae65a0e96b4">More...</a><br /></td></tr>
<tr class="separator:aea7548e9a68a84cddc74aae65a0e96b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a426d007f1700b19ea11249735736d29b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a426d007f1700b19ea11249735736d29b">begin</a> (gpio_num_t red1GPIO, gpio_num_t red0GPIO, gpio_num_t green1GPIO, gpio_num_t green0GPIO, gpio_num_t blue1GPIO, gpio_num_t blue0GPIO, gpio_num_t HSyncGPIO, gpio_num_t VSyncGPIO)</td></tr>
<tr class="memdesc:a426d007f1700b19ea11249735736d29b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the 64 colors (8 GPIOs) initializer.  <a href="#a426d007f1700b19ea11249735736d29b">More...</a><br /></td></tr>
<tr class="separator:a426d007f1700b19ea11249735736d29b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a264f0f7672bcef57f24851cab5909359"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a264f0f7672bcef57f24851cab5909359">getBitsPerChannel</a> ()</td></tr>
<tr class="memdesc:a264f0f7672bcef57f24851cab5909359"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets number of bits allocated for each channel.  <a href="#a264f0f7672bcef57f24851cab5909359">More...</a><br /></td></tr>
<tr class="separator:a264f0f7672bcef57f24851cab5909359"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e21977e4bf883decef44a11a4eb6bae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a4e21977e4bf883decef44a11a4eb6bae">setResolution</a> (char const *modeline, int viewPortWidth=-1, int viewPortHeight=-1)</td></tr>
<tr class="memdesc:a4e21977e4bf883decef44a11a4eb6bae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets current resolution using linux-like modeline.  <a href="#a4e21977e4bf883decef44a11a4eb6bae">More...</a><br /></td></tr>
<tr class="separator:a4e21977e4bf883decef44a11a4eb6bae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84da40002f647ee4cfdf772fa5d6404c"><td class="memItemLeft" align="right" valign="top"><a id="a84da40002f647ee4cfdf772fa5d6404c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a84da40002f647ee4cfdf772fa5d6404c">getScreenWidth</a> ()</td></tr>
<tr class="memdesc:a84da40002f647ee4cfdf772fa5d6404c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the screen width in pixels. <br /></td></tr>
<tr class="separator:a84da40002f647ee4cfdf772fa5d6404c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1b39a61f54160b24d86f4e57ebe4c41"><td class="memItemLeft" align="right" valign="top"><a id="ae1b39a61f54160b24d86f4e57ebe4c41"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#ae1b39a61f54160b24d86f4e57ebe4c41">getScreenHeight</a> ()</td></tr>
<tr class="memdesc:ae1b39a61f54160b24d86f4e57ebe4c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the screen height in pixels. <br /></td></tr>
<tr class="separator:ae1b39a61f54160b24d86f4e57ebe4c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28723c5bc4125af611718867de407994"><td class="memItemLeft" align="right" valign="top"><a id="a28723c5bc4125af611718867de407994"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a28723c5bc4125af611718867de407994">getViewPortCol</a> ()</td></tr>
<tr class="memdesc:a28723c5bc4125af611718867de407994"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns horizontal position of the viewport (in case viewport width is less than screen width). <br /></td></tr>
<tr class="separator:a28723c5bc4125af611718867de407994"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfe653df763cb841098017dbd4761d01"><td class="memItemLeft" align="right" valign="top"><a id="adfe653df763cb841098017dbd4761d01"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#adfe653df763cb841098017dbd4761d01">getViewPortRow</a> ()</td></tr>
<tr class="memdesc:adfe653df763cb841098017dbd4761d01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns vertical position of the viewport (in case viewport height is less than screen height). <br /></td></tr>
<tr class="separator:adfe653df763cb841098017dbd4761d01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9440a03d1d4366ad1fc0dfcecdfed12e"><td class="memItemLeft" align="right" valign="top"><a id="a9440a03d1d4366ad1fc0dfcecdfed12e"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a9440a03d1d4366ad1fc0dfcecdfed12e">getViewPortWidth</a> ()</td></tr>
<tr class="memdesc:a9440a03d1d4366ad1fc0dfcecdfed12e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns horizontal size of the viewport. <br /></td></tr>
<tr class="separator:a9440a03d1d4366ad1fc0dfcecdfed12e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fd4ddaeb407556e474854ad5473c605"><td class="memItemLeft" align="right" valign="top"><a id="a3fd4ddaeb407556e474854ad5473c605"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a3fd4ddaeb407556e474854ad5473c605">getViewPortHeight</a> ()</td></tr>
<tr class="memdesc:a3fd4ddaeb407556e474854ad5473c605"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns vertical size of the viewport. <br /></td></tr>
<tr class="separator:a3fd4ddaeb407556e474854ad5473c605"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe3ed0539212bbcd9d7cf9135901f5f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#afe3ed0539212bbcd9d7cf9135901f5f8">enableBackgroundPrimitiveExecution</a> (bool value)</td></tr>
<tr class="memdesc:afe3ed0539212bbcd9d7cf9135901f5f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables drawings inside vertical retracing time.  <a href="#afe3ed0539212bbcd9d7cf9135901f5f8">More...</a><br /></td></tr>
<tr class="separator:afe3ed0539212bbcd9d7cf9135901f5f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1841b0162740c890217c315e45ca8cb5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a1841b0162740c890217c315e45ca8cb5">suspendBackgroundPrimitiveExecution</a> ()</td></tr>
<tr class="memdesc:a1841b0162740c890217c315e45ca8cb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Suspends drawings.  <a href="#a1841b0162740c890217c315e45ca8cb5">More...</a><br /></td></tr>
<tr class="separator:a1841b0162740c890217c315e45ca8cb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96e451c20c02f395fbb59d63a9aa10b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a96e451c20c02f395fbb59d63a9aa10b4">resumeBackgroundPrimitiveExecution</a> ()</td></tr>
<tr class="memdesc:a96e451c20c02f395fbb59d63a9aa10b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resumes drawings after <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a1841b0162740c890217c315e45ca8cb5" title="Suspends drawings. ">suspendBackgroundPrimitiveExecution()</a>.  <a href="#a96e451c20c02f395fbb59d63a9aa10b4">More...</a><br /></td></tr>
<tr class="separator:a96e451c20c02f395fbb59d63a9aa10b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6797fa6b3b2a0e705cd07b4507ae2cd5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a6797fa6b3b2a0e705cd07b4507ae2cd5">processPrimitives</a> ()</td></tr>
<tr class="memdesc:a6797fa6b3b2a0e705cd07b4507ae2cd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws immediately all primitives in the queue.  <a href="#a6797fa6b3b2a0e705cd07b4507ae2cd5">More...</a><br /></td></tr>
<tr class="separator:a6797fa6b3b2a0e705cd07b4507ae2cd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1e0bc3e99fd0b92d1279836d40c627f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#ab1e0bc3e99fd0b92d1279836d40c627f">moveScreen</a> (int16_t offsetX, int16_t offsetY)</td></tr>
<tr class="memdesc:ab1e0bc3e99fd0b92d1279836d40c627f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves screen by specified horizontal and vertical offset.  <a href="#ab1e0bc3e99fd0b92d1279836d40c627f">More...</a><br /></td></tr>
<tr class="separator:ab1e0bc3e99fd0b92d1279836d40c627f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents the VGA controller. </p>
<p>Use this class to set screen resolution and to associate VGA signals to ESP32 GPIO outputs.</p>
<p>This example initializes VGA Controller with 8 colors (5 GPIOs used) and 640x350 resolution: </p><pre class="fragment">// Assign GPIO22 to Red, GPIO21 to Green, GPIO19 to Blue, GPIO18 to HSync and GPIO5 to VSync
VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5);

// Set 640x350@70Hz resolution
VGAController.setResolution(VGA_640x350_70Hz);
</pre><p>This example initializes VGA Controller with 64 colors (8 GPIOs used) and 640x350 resolution: </p><pre class="fragment">// Assign GPIO22 and GPIO_NUM_21 to Red, GPIO_NUM_19 and GPIO_NUM_18 to Green, GPIO_NUM_5 and GPIO_NUM_4 to Blue, GPIO_NUM_23 to HSync and GPIO_NUM_15 to VSync
VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15);

// Set 640x350@70Hz resolution
VGAController.setResolution(VGA_640x350_70Hz);</pre> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aea7548e9a68a84cddc74aae65a0e96b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea7548e9a68a84cddc74aae65a0e96b4">&#9670;&nbsp;</a></span>begin() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGAControllerClass::begin </td>
          <td>(</td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>redGPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>greenGPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>blueGPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>HSyncGPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>VSyncGPIO</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the 8 colors (5 GPIOs) initializer. </p>
<p>One GPIO per channel, plus horizontal and vertical sync signals.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">redGPIO</td><td>GPIO to use for red channel. </td></tr>
    <tr><td class="paramname">greenGPIO</td><td>GPIO to use for green channel. </td></tr>
    <tr><td class="paramname">blueGPIO</td><td>GPIO to use for blue channel. </td></tr>
    <tr><td class="paramname">HSyncGPIO</td><td>GPIO to use for horizontal sync signal. </td></tr>
    <tr><td class="paramname">VSyncGPIO</td><td>GPIO to use for vertical sync signal. <pre class="fragment">// Use GPIO 22 for red, GPIO 21 for green, GPIO 19 for blue, GPIO 18 for HSync and GPIO 5 for VSync
VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5);</pre> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a426d007f1700b19ea11249735736d29b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a426d007f1700b19ea11249735736d29b">&#9670;&nbsp;</a></span>begin() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGAControllerClass::begin </td>
          <td>(</td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>red1GPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>red0GPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>green1GPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>green0GPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>blue1GPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>blue0GPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>HSyncGPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>VSyncGPIO</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the 64 colors (8 GPIOs) initializer. </p>
<p>Two GPIOs per channel, plus horizontal and vertical sync signals.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">red1GPIO</td><td>GPIO to use for red channel, MSB bit. </td></tr>
    <tr><td class="paramname">red0GPIO</td><td>GPIO to use for red channel, LSB bit. </td></tr>
    <tr><td class="paramname">green1GPIO</td><td>GPIO to use for green channel, MSB bit. </td></tr>
    <tr><td class="paramname">green0GPIO</td><td>GPIO to use for green channel, LSB bit. </td></tr>
    <tr><td class="paramname">blue1GPIO</td><td>GPIO to use for blue channel, MSB bit. </td></tr>
    <tr><td class="paramname">blue0GPIO</td><td>GPIO to use for blue channel, LSB bit. </td></tr>
    <tr><td class="paramname">HSyncGPIO</td><td>GPIO to use for horizontal sync signal. </td></tr>
    <tr><td class="paramname">VSyncGPIO</td><td>GPIO to use for vertical sync signal.</td></tr>
  </table>
  </dd>
</dl>
<p>// Use GPIO 22-21 for red, GPIO 19-18 for green, GPIO 5-4 for blue, GPIO 23 for HSync and GPIO 15 for VSync VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15); </p>

</div>
</div>
<a id="afe3ed0539212bbcd9d7cf9135901f5f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe3ed0539212bbcd9d7cf9135901f5f8">&#9670;&nbsp;</a></span>enableBackgroundPrimitiveExecution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGAControllerClass::enableBackgroundPrimitiveExecution </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables or disables drawings inside vertical retracing time. </p>
<p>When vertical retracing occurs (on Vertical Sync) an interrupt is trigged. Inside this interrupt primitives like line, circles, glyphs, etc.. are painted. This method can disable (or reenable) this behavior, making drawing instantaneous. Flickering may occur when drawings are executed out of retracing time. When background executing is disabled the queue is emptied executing all pending primitives.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>When true drawings are done during vertical retracing, when false drawings are executed instantly. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a264f0f7672bcef57f24851cab5909359"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a264f0f7672bcef57f24851cab5909359">&#9670;&nbsp;</a></span>getBitsPerChannel()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ESP32VGA::VGAControllerClass::getBitsPerChannel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets number of bits allocated for each channel. </p>
<p>Number of bits depends by which <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#aea7548e9a68a84cddc74aae65a0e96b4" title="This is the 8 colors (5 GPIOs) initializer. ">begin()</a> initializer has been called.</p>
<dl class="section return"><dt>Returns</dt><dd>1 (8 colors) or 2 (64 colors). </dd></dl>

</div>
</div>
<a id="ab1e0bc3e99fd0b92d1279836d40c627f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1e0bc3e99fd0b92d1279836d40c627f">&#9670;&nbsp;</a></span>moveScreen()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGAControllerClass::moveScreen </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>offsetX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>offsetY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Moves screen by specified horizontal and vertical offset. </p>
<p>Screen moving is performed changing horizontal and vertical Front and Back porchs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offsetX</td><td>Horizontal offset in pixels. &lt; 0 goes left, &gt; 0 goes right. </td></tr>
    <tr><td class="paramname">offsetY</td><td>Vertical offset in pixels. &lt; 0 goes up, &gt; 0 goes down.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Move screen 4 pixels right, 1 pixel left
VGAController.moveScreen(4, -1);</pre> 
</div>
</div>
<a id="a6797fa6b3b2a0e705cd07b4507ae2cd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6797fa6b3b2a0e705cd07b4507ae2cd5">&#9670;&nbsp;</a></span>processPrimitives()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IRAM_ATTR ESP32VGA::VGAControllerClass::processPrimitives </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws immediately all primitives in the queue. </p>
<p>Draws all primitives before they are processed in the vertical sync interrupt. May generate flickering because don't care of vertical sync. </p>

</div>
</div>
<a id="a96e451c20c02f395fbb59d63a9aa10b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96e451c20c02f395fbb59d63a9aa10b4">&#9670;&nbsp;</a></span>resumeBackgroundPrimitiveExecution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGAControllerClass::resumeBackgroundPrimitiveExecution </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resumes drawings after <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a1841b0162740c890217c315e45ca8cb5" title="Suspends drawings. ">suspendBackgroundPrimitiveExecution()</a>. </p>
<p>Resumes drawings enabling vertical sync interrupt. </p>

</div>
</div>
<a id="a4e21977e4bf883decef44a11a4eb6bae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e21977e4bf883decef44a11a4eb6bae">&#9670;&nbsp;</a></span>setResolution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGAControllerClass::setResolution </td>
          <td>(</td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>modeline</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>viewPortWidth</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>viewPortHeight</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets current resolution using linux-like modeline. </p>
<p>Modeline must have following syntax (non case sensitive): </p><pre class="fragment">"label" clock_mhz hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend vtotal (+HSync | -HSync) (+VSync | -VSync) [DoubleScan] [FrontPorchBegins | SyncBegins | BackPorchBegins | VisibleBegins]
</pre><p>In <a class="el" href="_v_g_a_conf_8h.html" title="This file contains ESP32VGA library configuration settings, like number of supported colors...">VGAConf.h</a> there are macros with some predefined modelines for common resolutions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">modeline</td><td>Linux-like modeline as specified above. </td></tr>
    <tr><td class="paramname">viewPortWidth</td><td>Horizontal viewport size in pixels. If less than zero (-1) it is sized to modeline visible area width. </td></tr>
    <tr><td class="paramname">viewPortHeight</td><td>Vertical viewport size in pixels. If less then zero (-1) it is sized to maximum allocable.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Use predefined modeline for 640x480@60Hz
VGAController.setResolution(VGA_640x480_60Hz);

// The same of above using modeline string
VGAController.setResolution("\"640x480@60Hz\" 25.175 640 656 752 800 480 490 492 525 -HSync -VSync");

// Set 640x382@60Hz but limit the viewport to 640x350
VGAController.setResolution(VGA_640x382_60Hz, 640, 350);</pre> 
</div>
</div>
<a id="a1841b0162740c890217c315e45ca8cb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1841b0162740c890217c315e45ca8cb5">&#9670;&nbsp;</a></span>suspendBackgroundPrimitiveExecution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ESP32VGA::VGAControllerClass::suspendBackgroundPrimitiveExecution </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Suspends drawings. </p>
<p>Suspends drawings disabling vertical sync interrupt. After call to <a class="el" href="class_e_s_p32_v_g_a_1_1_v_g_a_controller_class.html#a1841b0162740c890217c315e45ca8cb5" title="Suspends drawings. ">suspendBackgroundPrimitiveExecution()</a> adding new primitives may cause a deadlock. To avoid it a call to "processPrimitives()" should be performed very often. This method maintains a counter so can be nested. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_v_g_a_controller_8h_source.html">VGAController.h</a></li>
<li>VGAController.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
